<template>
  <!--新增修改商机页面-->
  <div class="add">
    <!--左边基础资料-->
    <div class="leftcont">
      <el-scrollbar style="height: 100%" >
        <div class="return">
          <span><i class="el-icon-back"></i>   返回</span>
        </div>
        <div class="info">基础资料</div>
        <el-form  label-width="100px" class="demo-ruleForm">

          <el-form-item label="来源客户：">
            <el-input v-model="zhi" class="input_sty" ></el-input>
          </el-form-item>
          <el-form-item label="主题:">
            <el-input class="input_sty" ></el-input>
          </el-form-item>
          <el-form-item label="订单号:">
            <el-input class="input_sty" ></el-input>
          </el-form-item>
          <el-form-item label="付款方式:">
            <el-input class="input_sty" ></el-input>
          </el-form-item>
          <el-form-item label="来源商机:">
            <el-input class="input_sty" ></el-input>
          </el-form-item>
          <el-form-item label="合同签约人:">
            <el-input class="input_sty">

            </el-input>
          </el-form-item>
          <el-form-item label="订单日期:">
            <el-date-picker
              v-model="startTime"
              type="date"
              placeholder="选择日期">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="最晚发货:">
            <el-date-picker
              v-model="endTime"
              type="date"
              placeholder="选择日期">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="收货人信息:">
            <el-input class="input_sty">

            </el-input>
          </el-form-item>
          <el-form-item label="总金额:">
            <el-input
              placeholder="0.00"
              v-model="amount" class="input_sty" >
            </el-input>

          </el-form-item>
        </el-form>
      </el-scrollbar>
    </div>
    <!--右边商品-->
    <div class="rightcont">
      <div class="tableInfo">
        <p><el-button type="text"  @click="isAdd=true">添加产品</el-button></p>
        <div>
          <el-table
            :data="tableData"
            style="width: 100%">
            <el-table-column
              fixed
              prop="date"
              label="产品名称"
              width="180">
            </el-table-column>
            <el-table-column
              prop="name"
              label="型号"
              width="140">
            </el-table-column>
            <el-table-column
              prop="address"
              label="售价">
            </el-table-column>
            <el-table-column
              label="报价"
              width="140">
              <el-input v-model="num" size="mini " style="width:47px"></el-input>
            </el-table-column>
            <el-table-column
              label="数量"
              width="160">
              <el-input v-model="num" size="mini " style="width:47px"></el-input>
            </el-table-column>
            <el-table-column
              label="单位"
              width="150">
              辆
            </el-table-column>
            <el-table-column
              label="小计"
              width="130">
              12000
            </el-table-column>
            <el-table-column
              label="操作"
              width="130">
              <el-button type="text" size="small" icon="el-icon-delete"></el-button>
            </el-table-column>
          </el-table>
        </div>
        <p style="font-size:18px;float: right">
          总金额:￥<span style="color:red;">0.00</span>
        </p>
      </div>
      <p style="margin-top: 54px;padding-left: 419px;">
        <el-button type="primary">确定</el-button>
      </p>
    </div>
    <!--添加商品-->
    <div class="dept-dialog" v-show="isAdd">
      <div class="addGood">
        <p style="color:#777;margin-left: 12px;">添加产品</p>
        <div class="search">
          <el-input
            placeholder="请输入产品名称"
            v-model="input4" suffix-icon="el-icon-search" size="small">
          </el-input>
        </div>
        <div class="goodTable">
          <el-table
            ref="multipleTable"
            :data="goodist"
            tooltip-effect="dark"
            max-height="250"
            style="width: 100%">
            <el-table-column
              type="selection"
              width="55">
            </el-table-column>
            <el-table-column
              label="产品名称"
              width="120">
              <template slot-scope="scope">{{ scope.row.date }}</template>
            </el-table-column>
            <el-table-column
              prop="name"
              label="型号"
              width="120">
            </el-table-column>
            <el-table-column
              prop="address"
              label="价格"
            >
            </el-table-column>
            <el-table-column
              label="单位"
            >
              辆
            </el-table-column>
          </el-table>
          <div class="block">
            <el-pagination
              :current-page="currentPage4"
              :page-sizes="[100, 200, 300, 400]"
              :page-size="100"
              layout="total, sizes, prev, pager, next, jumper"
              :total="400">
            </el-pagination>
          </div>
        </div>
        <div class="anniu">
          <el-button type="primary" size="small">确定</el-button>
          <el-button size="small" @click="isAdd=false">取消</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        options: [{
          value: '选项1',
          label: '立项'
        }, {
          value: '选项2',
          label: '深度接触'
        }, {
          value: '选项3',
          label: '方案设计'
        }, {
          value: '选项4',
          label: '报价设计'
        }, {
          value: '选项5',
          label: '签单'
        }, {
          value: '选项6',
          label: '项目成功'
        }, {
          value: '选项7',
          label: '项目失败'
        }],
        value: '',
        value1: '',//时间
        textValue:'',//合同描述
        startTime:'',//合同开始时间
        endTime:'',//合同结束时间
        amount:'',//合同总金额
        zhi:'',
        //右边商品
        tableData: [{
          date: '劳斯莱斯',
          name: '001',
          address: '250'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普'
        },{
          date: '劳斯莱斯',
          name: '001',
          address: '250'
        }],
        num: '1',
        input4:'',//添加商品里面的查询
        goodist: [{//商品列表
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-08',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-06',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-07',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }],
        multipleSelection: [],
        currentPage4: 4,//分页
        isAdd:false
      }
    }
  }
</script>

<style scoped>
  .input_sty{
    width:220px;
  }
  .add{
    border:1px solid #ccc;
    width:100%;
    height: 550px;
    background: white;
    border-radius: 5px;
    box-shadow:#ccc 0px 0px 10px;
    overflow:hidden;
  }
  .leftcont{
    width:46%;
    height: 550px;
    border-right:1px dashed #ccc;
    float: left;

  }
  .el-form{
    margin-left: 70px;
    margin-top: 8px;
  }
  .rightcont{
    width:46%;
    border:0px solid red;

    float: left;
  }
  .info{
    color:#777;
    font-size:14px;
    border-left: 6px solid #409eff;
    width:80px;
    height:24px;
    text-align: center;
    margin-top: 15px;
    margin-left: 30px;

  }
  .add .return{
    border-right:1px solid #ccc;
    width:70px;
    color:#777;
    font-size: 13px;
    margin-left:10px;
    margin-top:10px;
    cursor: pointer;

  }
  .add .return:hover{
    color:#409eff;
  }
  .tableInfo{
    width:100%;
    margin-left:20px;
    border:0px solid red;
  }
  .dept-dialog{
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.5);
    position:fixed;
    top:0px;
    left:0px;
    z-index:4;
  }
  .addGood{
    width:705px;
    height:470px;
    border-radius: 5px;
    background: white;
    position: fixed;
    left:26%;
    top:20%;
    margin:0 auto;
  }
  .search{
    border-top:1px solid #e6e6e6;
    width:700px;
    height:46px;
  }
  .search .el-input{
    width:240px;
    margin-left: 425px;
    margin-top: 6px;
  }
  .goodTable{
    width:690px;
    border:0px solid red;
    margin-left: 8px;
  }
  .goodTable .el-table{
    height: 270px;
  }
  .block{
    float: right;
    margin-top: 10px;
  }
  .anniu{
    border:0px solid red;
    width: 130px;
    margin-top: 57px;
    margin-left: 556px;
  }
</style>
